#自动生成一个8位随机密码

#!/bin/bash
Str="abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345 6789"
pass=""
for i in {1..8}
do
  num=$[RANDOM%${#Str}]
  tmp=${Str:num:1}
  pass+=$tmp
done
echo $pass